package com.obas.type;

import com.ease.common.enums.EnumUtil;
import com.ease.common.enums.OptionalEnum;
import com.obas.model.business.SystemScenario;
import com.obas.model.business.SystemUsecase;
import com.obas.model.business.TestcaseScript;

public enum ParameterSourceType implements OptionalEnum {
	
	TestcaseScript((short) 1, TestcaseScript.class.getSimpleName()), //
	SystemUsecase((short) 2, SystemUsecase.class.getSimpleName()), //
	SystemScenario((short) 4, SystemScenario.class.getSimpleName()); //

	private short value;

	private String text;

	private ParameterSourceType(short value, String text) {
		this.value = value;
		this.text = text;
	}

	public static ParameterSourceType get(short value) {
		return EnumUtil.get(ParameterSourceType.class, value);
	}

	public static ParameterSourceType get(String name) {
		return EnumUtil.get(ParameterSourceType.class, name);
	}

	public String getText() {
		return text;
	}

	public String getName() {
		return name();
	}

	public short getValue() {
		return value;
	}

}
